//
// Created by 戴文龙 on 2016/11/3.
// Copyright (c) 2016 Facebook. All rights reserved.
//

#import "RCTMath.h"


@implementation RCTMath

  RCT_EXPORT_MODULE();

RCT_EXPORT_METHOD(add:(int) a
                 var2: (int) b
             resolver:(RCTPromiseResolveBlock)resolve
             rejecter:(RCTPromiseRejectBlock)reject)
{
    NSString * result = [NSString stringWithFormat: @"%d", a+b];
    resolve(result);
}

RCT_EXPORT_METHOD(multiply:(int) a
                      var2:(int) b
                    caller:(RCTResponseSenderBlock) callback)
{
    NSString * result = [NSString stringWithFormat: @"%d", a*b];
    callback(result);
}



@end